{%extends file="user/page/layout.tpl"%}

{%block name="sub-head-static"%}
{%require name="user:static/withdraw/withdraw.less"%}
{%require name="user:static/withdraw/withdraw.js"%}
<script>
    P.data('can_withdraw',{%$data.wallet.canwithdraw%});
    P.data('id_card','{%$data.user.id_card%}');
    P.data('need_fee', '{%$data.need_fee%}');
</script>
{%/block%}

{%block name="right-content"%}
<div class="page-withdraw">
    <div class="block withdraw-block">
        <div class="title">提现信息</div>

        {%if !$data.user.id_card%}
            <div class="recharge-tip">
                <span>需要进行实名认证才能提现，您还没有进行实名认证，</span>
                <a href="/user/security">现在去认证</a>。
            </div>
        {%/if%}

        <div style="padding-top:20px;">
            <table>
                <tr>
                    <td width="16%">持卡人：</td>
                    <td width="84%">{%$data.user.id_card_name%}</td>
                </tr>
                <tr>
                    <td>提现到银行卡：</td>
                    <td>
                        <div class="bank-list">
                            <div class="self">
                                <i></i>
                                {%if $data.bank_list && $data.bank_list|count>0%}
                                选择银行卡
                                {%else%}
                                没有添加银行卡
                                {%/if%}
                            </div>
                            <ul class="drop-menu">
                                {%foreach $data.bank_list as $bank%}
                                {%if !$bank.is_delete%}
                                <li data-id='{%$bank.id%}'
                                    data-bank-type='{%$bank.bank_type|bank_map%}'
                                    data-number='{%$bank.bankcard_number|ed_substr%}'>
                                    <i></i>
                                    <span class="name">{%$bank.bank_type|bank_map%}</span>
                                    <span class="">尾号</span>
                                    <span class="number">{%$bank.bankcard_number|ed_substr%}</span>
                                </li>
                                {%/if%}
                                {%/foreach%}
                            </ul>
                        </div>
                        <a class="btn btn-this btn-add" href="/user/bankcard">添加</a>
                        <a class="btn btn-this btn-manage" href="/user/bankcard">管理</a>
                        <span class="error-tip bankcard-error">未选择银行卡</span>
                        <div class="clear"></div>
                    </td>
                </tr>

                <tr class="line">
                    <td>可用余额：</td>
                    <td>￥{%$data.wallet.canwithdraw|format_amount%}</td>
                </tr>
                <tr>
                    <td>提现金额：</td>
                    <td>
                        <input type="text" class="input-common input-common-small withdraw-amount">
                        <span class="error-tip amount-error">金额填写错误</span>
                    </td>
                </tr>
                <tr>
                    <td>手续费：</td>
                    <td>
                        {%if $data.need_fee%}
                        2元
                        {%else%}
                        免费
                        {%/if%}
                    </td>
                </tr>
                <tr >
                    <td>实际到账金额：</td>
                    <td class="actual-withdraw-amount">￥0</td>
                </tr>

                <tr class="line">
                    <td>手机验证码：</td>
                    <td>
                        <input type="text" class="input-common input-common-small iphone-code">
                        {%widget name="user:widget/code/code.tpl" call='code' id=1%}
                        <span class="error-tip code-error">手机验证码错误</span>
                    </td>
                </tr>
                <tr>
                    <td>交易密码：</td>
                    <td>
                        <div>
                            <input type="password" class="input-common input-common-small trade-password">
                            <span class="error-tip password-error">交易密码码错误</span>
                        </div>
                        <div style="margin-top:10px">
                            到<a href="/user/security" class="text-link">安全中心</a>设置或修改交易密码
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align: left">
                        <button class="btn btn-large btn-main btn-withdraw">提现</button>
                    </td>
                </tr>
            </table>
        </div>
    </div>

    <div class="block tip-block">
        <h5>温馨提示：</h5>
        <p>1、为保障您的账户资金安全，请您在提现之前先完成<a class="text-link" href="/user/security">实名认证</a>及<a class="text-link" href="/user/bankcard">银行卡绑定</a>。</p>
        <p>2、您选择的银行卡开户名必须与您真融宝账户实名认证一致，否则提现申请将不会通过。</p>
        <p>3、提现时，第三方支付平台会收取2元的手续费，这将消耗提现额度内的资金。</p>
        <p>4、收到您的提现请求后，真融宝将在1个工作日（双休日或法定节假日顺延）内处理您的提现申请，请您注意查收；受银行和第三方支付平台影响，你将会在最多2个工作日（双休日或法定节假日顺延）内收到提现资金。</p>
        <p>5、<span style="font-weight: 700">严禁利用真融宝进行套现、洗钱、匿名转账，对于频繁的非正常投资为目的的资金充提行为</span>，一经发现，真融宝将通过原充值渠道进行资金清退，已收取手续费将不予返还。</p>
    </div>
</div>
{%/block%}